/**Variable**/

/*筛选*/
.vxe-cell--filter {
  padding: 0 0.1em 0 0.25em;
  text-align: center;
  vertical-align: middle;
  display: inline-block;
  line-height: 0;
  &.is--active {
    .vxe-filter--btn {
      color: $vxe-font-color;
    }
  }
  .vxe-filter--btn {
    color: $vxe-table-column-icon-border-color;
    cursor: pointer;
    &:hover {
      color: $vxe-font-color;
    }
  }
}
.filter--active {
  .vxe-cell--filter {
    .vxe-filter--btn {
      color: $vxe-primary-color;
    }
  }
}

/*筛选容器*/
.vxe-table--filter-wrapper {
  display: none;
  position: absolute;
  min-width: 100px;
  border-radius: 2px;
  background-color: #fff;
  border: 1px solid $vxe-table-popup-border-color;
  box-shadow: 3px 3px 4px -2px rgba(0, 0, 0, 0.6);
  z-index: 10;
  &:not(.is--multiple) {
    text-align: center;
  }
  &.filter--active {
    display: block;
  }
  .vxe-table--filter-header,
  .vxe-table--filter-body {
    & > li {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      max-width: 360px;
      padding: 0.25em 0.8em;
      cursor: pointer;
      &.is--checked {
        color: $vxe-primary-color;
      }
      &:hover {
        background-color: $vxe-table-row-hover-background-color;
      }
    }
  }
  .vxe-table--filter-header {
    padding-top: 0.2em;
  }
  .vxe-table--filter-body {
    max-height: 240px;
    padding-bottom: 0.2em;
  }
  .vxe-table--filter-template {
    padding: 0.8em
  }
  & > ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
    overflow: auto;
    user-select: none;
  }
  &.is--multiple {
    & > ul {
      & > li {
        padding: 0.25em 0.8em 0.25em 2.2em;
      }
    }
  }
  .vxe-table--filter-footer {
    border-top: 1px solid $vxe-table-popup-border-color;
    padding: 0.6em;
    user-select: none;
    button {
      background-color: transparent;
      padding: 0 0.4em;
      border: 0;
      color: $vxe-font-color;
      cursor: pointer;
      &:focus {
        outline: none;
      }
      &:hover {
        color: $vxe-primary-color;
      }
      &.is--disabled {
        color: #c0c4cc;
        cursor: not-allowed;
      }
    }
  }
}

.vxe-table--filter-option {
  position: relative;
  .vxe-checkbox--icon {
    &:before {
      content: "";
      position: absolute;
      height: 1em;
      width: 1em;
      top: 0.35em;
      left: 0.6em;
      border-radius: $vxe-checkbox-border-radius;
      border: $vxe-checkbox-border-width solid $vxe-input-border-color;
    }
  }
  &.is--checked,
  &.is--indeterminate {
    .vxe-checkbox--icon {
      &:before {
        border-color: $vxe-primary-color;
        background-color: $vxe-primary-color;
      }
      &:after {
        content: "";
        position: absolute;
      }
    }
  }
  &.is--checked {
    .vxe-checkbox--icon {
      &:after {
        height: 0.64em;
        width: 0.32em;
        top: 0.45em;
        left: 0.95em;
        border: 2px solid #ffffff;
        border-left: 0;
        border-top: 0;
        transform: rotate(45deg);
      }
    }
  }
  &.is--indeterminate {
    .vxe-checkbox--icon {
      &:after {
        top: 0.75em;
        left: 0.6em;
        height: 0.18em;
        width: 1em;
        background-color: #ffffff;
        transform: scale(.6);
      }
    }
  }
  &:not(.is--disabled) {
    &:hover {
      .vxe-checkbox--icon {
        &:before {
          border-color: $vxe-primary-color;
        }
      }
    }
  }
  &.is--disabled {
    cursor: not-allowed;
    color: $vxe-input-disabled-color;
    &.is--checked {
      .vxe-checkbox--icon {
        &:before {
          border-color: $vxe-input-disabled-color;
          background-color: $vxe-input-disabled-background-color;
        }
        &:after {
          border-color: $vxe-input-disabled-color;
        }
      }
    }
  }
}

.vxe-table {
  .vxe-table--filter-option {
    & > .vxe-checkbox--icon {
      font-size: $vxe-checkbox-font-size-default;
    }
  }
  &.size--medium {
    .vxe-table--filter-option {
      & > .vxe-checkbox--icon {
        font-size: $vxe-checkbox-font-size-medium;
      }
    }
  }
  &.size--small {
    .vxe-table--filter-option {
      & > .vxe-checkbox--icon {
        font-size: $vxe-checkbox-font-size-small;
      }
    }
  }
  &.size--mini {
    .vxe-table--filter-option {
      & > .vxe-checkbox--icon {
        font-size: $vxe-checkbox-font-size-mini;
      }
    }
  }
}